package com.example.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.demo.entity.Stock;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.mapstruct.Mapper;

@Mapper
public interface StockMapper extends BaseMapper<Stock> {
    @Update("update db_stock set Stock_amount = Stock_amount + ${amount} where Stock_Goods_name = '${goodsName}'")
    void updateFromGoodsEntry(@Param("amount") String amount,@Param("goodsName") String goodsName);
}
